<?php

namespace Trawind\Helpers;

class StrHelper extends \Illuminate\Support\Str
{


    /**
     * 驼峰命名转下划线命名
     * @param $words
     * @param  string  $separator
     * @return string
     */
    public static function uncamel($words, $separator = '_')
    {
        return strtolower(preg_replace('/([a-z])([A-Z])/', "$1".$separator."$2", $words));
    }
}